package com.qqt.csr.ixport.vo.req;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.qqt.csr.common.idempotent.RequestKeyParam;
import com.qqt.csr.common.operalog.OperaLogSchema;
import com.qqt.csr.ixport.enums.TaskStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;

@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@JsonIgnoreProperties(ignoreUnknown = true)
@Schema(name = "SwitchingImportTaskStatusReqVO", description = "切换导入任务状态")
public class SwitchingImportTaskStatusReqVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 3513455386636354333L;

    @Schema(description = "任务id",requiredMode = Schema.RequiredMode.REQUIRED)
    @OperaLogSchema(desc = "任务id")
    @NotNull(message = "任务id不能为空")
    @RequestKeyParam
    private Long taskId;

    @Schema(description = "新任务状态：UN_START 重传；PAUSE 暂停；CANCEL 取消；")
    @NotNull(message = "新任务状态不能为空")
    @OperaLogSchema(desc = "变更新任务状态")
    private TaskStatus newStatus;
}
